package de.mhu.mandalaui;

import de.mhu.mandalaui.text.Text;

public class TextComposit extends AbstractComposite<Text,Object> {

	public TextComposit() {
	}
	
	public TextComposit(Text ... components ) {
		add(components);
	}
	
	public void add(Text ... items) {
		if (items == null) return;
		for (Text item : items)
			add(item, (Object)null);
	}

	@Override
	protected void doInitialize() {
	}

	@Override
	protected void doDestroy() {
	}

	@Override
	public void render(Response response) {
		for (Container<Text, Object> item : this) {
			response.containerEnter(item.getItem());
			item.getItem().render(response);
			response.containerLeave();
		}
	}

}
